home *** CD-ROM | disk | FTP | other *** search
/ Champak 119 / (Vol 119) Nov 09 2010.iso / Games / tobby_ura_ura.swf / scripts / DefineSprite_89 / frame_1 / DoAction.as
Text File  |  2010-11-09  |  477b  |  25 lines

  1. function alg()
  2. {
  3.    var d = Math.cos(this.Angle * 3.141592653589793 / 180) * this.amp;
  4.    if(this.moveUDflg == true)
  5.    {
  6.       this.py += d;
  7.    }
  8.    if(this.moveLRflg == true)
  9.    {
  10.       this.px += d;
  11.    }
  12.    this.Angle += this.speed;
  13.    this.Angle %= 360;
  14.    if(this.hitTest(_root.tobbyMC.hitdummyMC))
  15.    {
  16.       _root.tobbyMC.miss();
  17.    }
  18.    if(this.hitTest(_root.handMC))
  19.    {
  20.       _root.handMC.miss();
  21.    }
  22. }
  23. this.py = this._y;
  24. this.px = this._x;
  25.